import { get, post } from "../utils/request";

/**
 * 获取商品列表
 * @returns
 */
export const loadDataAPI = (page = 1, category = "") =>
  get("/api/v1/products", { page, category });
/**
 * 获取商品详情
 * @param {*} id
 * @returns
 */
export const loadDataByIdAPI = (id) => get(`/api/v1/products/${id}`);

/**
 * 获取商品的分类
 * @returns
 */
export const loadCategoryAPI = () => get("/api/v1/product_categories");
